﻿@{
    ViewBag.Title = "登录";
}

<link rel="Stylesheet" type="text/css" href="@Url.Content("~/Content/log.css")" />
<script src="@Url.Content("~/Scripts/login-valid.js")" type="text/javascript"></script>

<div class="log">
	<div id="log-left">
		<img src="/Content/Image/star1.jpg" alt="快登录吧">
	</div>
	<div id="log-right">
        <form action="" method="post">
        <fieldset>
        <legend>在此登录吧~</legend>
        <br />
		<span>用户名:</span><br/>
		<input name="username" type="text" placeholder="请在此输入用户名"/>
		<br /><br />
		<span>密&nbsp;&nbsp;码:</span><br />
		<input name="password" type="password" placeholder="请在此输入密码"/>
		<br /><br />
		<input name="login" type="submit" value="登录" onclick="check()"/>      
        </fieldset> 
        </form>
        @{
            if (ViewData["isSuccess"] !=null && (bool)ViewData["isSuccess"]) 
            {        
                <script type="text/javascript">
                    alert("登录成功！");
                    window.history.back(-1);
                </script>
                
            }
            else if (ViewData["isSuccess"] !=null)
            {
                <script type="text/javascript">
                     alert("用户名或密码错误，请重新登录！");
                </script>
            
            }
        }
    </div>
</div>